From e47c8e2490bff0ac41bd5ec54bfce2df6b018aa4 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 24 Nov 2010 01:13:27 +0100 Subject: [PATCH] GtkStyle: Return the default icon set if no context is attached. --- gtk/gtkstyle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index cdd12491c6..ad23f22a22 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1007,7 +1007,10 @@ gtk_style_lookup_icon_set (GtkStyle *style, priv = GTK_STYLE_GET_PRIVATE (style); - return gtk_style_context_lookup_icon_set (priv->context, stock_id); + if (priv->context) + return gtk_style_context_lookup_icon_set (priv->context, stock_id); + + return gtk_icon_factory_lookup_default (stock_id); } /** -- 2.30.2